x2APIC: improve enabling logic
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jul 2010 07:31:29 +0000 (08:31 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jul 2010 07:31:29 +0000 (08:31 +0100)
commit52ff658b7e69e45f00679b7f1a29d25ab7ed7f8e
tree879b8c70575e6963c2778e10b23583664dcc1cc1
parent19fbbfffdc2e8ad2c20f577e2a3e9b46a8a9e1da
x2APIC: improve enabling logic

This patch masks PIC and IOAPIC RTE's before x2APIC enabling, unmask
and restore them after x2APIC enabling. It also really enables
interrupt remapping before x2APIC enabling instead of just checking
interrupt remapping setting. This patch also handles all x2APIC
configuration including BIOS settings and command line
settings. Especially, it handles that BIOS hands over in x2APIC mode
(when there is apic id > 255). It checks if x2APIC is already enabled
by BIOS. If already enabled, it will disable interrupt remapping and
queued invalidation first, then enable them again.

Signed-off-by: Weidong Han <weidong.han@intel.com>
13 files changed:
xen/arch/x86/apic.c
xen/arch/x86/genapic/x2apic.c
xen/arch/x86/i8259.c
xen/arch/x86/io_apic.c
xen/arch/x86/setup.c
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/asm-x86/apic.h
xen/include/asm-x86/genapic.h
xen/include/asm-x86/io_apic.h
xen/include/asm-x86/irq.h
xen/include/xen/iommu.h